﻿using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace SpImageCacheSolution
{
    public class SpImageCacheField : SPFieldUrl
    {
        public SpImageCacheField(SPFieldCollection fields, string fieldName)
            : base(fields, fieldName)
        {
            DisplayFormat = SPUrlFieldFormatType.Image;
        }

        public SpImageCacheField(SPFieldCollection fields, string typeName, string displayName)
            : base(fields, typeName, displayName)
        {
            DisplayFormat = SPUrlFieldFormatType.Image;
        }

        public override BaseFieldControl FieldRenderingControl
        {
            get
            {
                return new UrlField { FieldName = InternalName };
            }
        }
    }
}
